<%@ page pageEncoding="utf8" %>
<%@page import="com.alibaba.fastjson.JSONObject" %>
<%@page import="com.mrd.gtimp.business.repository.FundFlowDao" %>
<%@page import="com.mrd.util.SpringContextHolder" %>

<%
    response.setHeader("Content-Type", "application/javascript;charset=UTF-8");
    FundFlowDao dao = SpringContextHolder.getBean(FundFlowDao.class);
    java.util.List<Object> result = dao.findEntityBySql("select c.com_name, d.balance from t_sys_company c right join ( " +
            "select rank, id, com_id, balance, reg_date  " +
            "from  (select  row_number() over (partition by com_id order by reg_date desc) rank,  id, com_id, balance, reg_date from t_biz_fund_flow)t  " +
            "where rank< 2 order by com_id asc,reg_date desc " +
            ") d on c.com_id=d.com_id", 0, 10, null);
%>

var 实时余额 = {
查询时间:<%=System.currentTimeMillis() %>,
数据头:['客户名称','实时余额'],
数据集:
<%=JSONObject.toJSONString(result) %>
};
